import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/plant/plant-info/query',
    method: 'post',
    data
  })
}

export function upload(data) {
  return request({
    url: '/plant/image/upload',
    method: 'post',
    data
  })
}

export function deleteImg(id) {
  return request({
    url: `/plant/image/${id}`,
    method: 'delete'
  })
}

export function insertOne(data) {
  return request({
    url: `/plant/plant-info/insertOne`,
    method: 'post',
    data
  })
}
export function upateById(data) {
  return request({
    url: `/plant/plant-info/upateById`,
    method: 'put',
    data
  })
}
export function detail(id) {
  return request({
    url: `/plant/plant-info/${id}`,
    method: 'get'
  })
}

export function importZipFile(data) {
  return request({
    url: `/plant/file/importZipFile`,
    method: 'POST',
    data
  })
}

export function deleteList(id) {
  return request({
    url: `/plant/auxiliary-knowledge/${id}`,
    method: 'delete'
  })
}

export function deletePlant(id) {
  return request({
    url: `/plant/plant-info/${id}`,
    method: 'delete'
  })
}

export function discern() {
  return request({
    url: `/plant/plant-info/discern`,
    method: 'get'
  })
}

export function auxiliaryQuery(data) {
  return request({
    url: `/plant/auxiliary-knowledge/query`,
    method: 'post',
    data
  })
}

export function auxiliaryinsertOne(data) {
  return request({
    url: `/plant/auxiliary-knowledge/insertOne`,
    method: 'post',
    data
  })
}

export function getauxiliary(id) {
  return request({
    url: `/plant/auxiliary-knowledge/${id}`,
    method: 'get'
  })
}

export function upateByIdauxiliary(data) {
  return request({
    url: `/plant/auxiliary-knowledge/upateById`,
    method: 'put',
    data
  })
}
